<?php echo $this->Html->css('Base/index'); ?>

<!-- BEGIN PAGE CONTENT-->
<div class="box">
    <div class="box-header">
        <h3 class="box-title">Danh sách Hệ Điều Hành</h3>                                    
    </div><!-- /.box-header -->
    <!-- Button Add Product -->
    <div class="btn-add-element">
		<?php echo $this->Html->link('Add', array(
                'controller' => 'Os', 
                'action' => 'add'), 
                array('class' => 'btn btn-primary btn-flat')); 
                ?>
    </div>
	<!--thong bao-->
	<?php echo $this->Session->flash();?>
	<!--/thong bao-->
	
    <div class="box-body table-responsive">
    	<!-- BEGIN TABLE sliders LIST-->
        <table id="example1" class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th>Tên</th>                                            
                    <th>Edit</th>   
                </tr>
            </thead>
            <tbody>
            	<?php foreach($data as $item){?>
                <tr>
					<td><?php echo $item['Os']['name'] ?></td>
					<td> 
						<a href="/admin/os/edit/<?php echo $item['Os']['id'] ?>"><i class="fa fa-edit"></i></a>
						<a href="/admin/os/delete/<?php echo $item['Os']['id'] ?>" onclick="if (confirm('Bạn có muốn xóa?')) { return true; } return false;"><i class="fa  fa-times-circle"></i></a>
					</td>			
                </tr>
                <?php }?> 
            </tbody>
            <tfoot>
                <tr>
                    <th>Tên</th>                                            
                    <th>Edit</th>   
                </tr>
            </tfoot>
        </table>
        <!-- END TABLE sliders LIST-->
    </div><!-- /.box-body -->
     <!-- BEGIN PAGINATION -->
    <?php echo $this->element('pagination', array('Paginator' => $this->Paginator));?>
 <!-- END PAGINATION -->
</div><!-- /.box -->
<!-- END PAGE CONTENT -->


<!-- page script -->
<script type="text/javascript">
    $(function() {
        $('#example1').dataTable({
                "bPaginate": false,
                "bLengthChange": false,
                "bFilter": true,
                "bSort": true,
                "bInfo": false,
                "bAutoWidth": false
        });
    }); 
</script>